import axios from "axios";

export default {
  namespaced: true,
  state: {
    data: 1,
  },
  getter: {

  },
  mutations: {
  },
  actions: {


    login(state, payload){
      axios.post("/users/login", payload).then(res => {
        if (res.data.flag) {
          localStorage.usertoken1 = JSON.stringify(res.data.usersData);
          alert("登录成功！！！");
          location.href = "/#/system"
        } else {
          alert("登录失败！！！");
        }
      })
    }
  },
  modules: {
  }
}
